home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 February / macformat-047.iso / Demos / Picasso Interactive Demo / Data / Sequence / Sequence.Dxr / Internal_8_Sc. Debug.ls < prev    next >
Encoding:
Text File  |  1996-12-02  |  4.4 KB  |  107 lines

  1. on ouvrirFenetreDebug
  2.   global windowDebug, gPathDelimitor
  3.   if objectp(windowDebug) then
  4.     forget(windowDebug)
  5.   end if
  6.   set windowDebugRect to rect(1, 39, 321, 239)
  7.   set windowDebug to window "Debug"
  8.   set the rect of windowDebug to windowDebugRect
  9.   set the fileName of windowDebug to the pathName & "Debug" & gPathDelimitor & "DEBUG.DIR"
  10.   set the windowType of windowDebug to 4
  11.   open(windowDebug)
  12.   initialiserDebug()
  13.   updaterDebug()
  14. end
  15.  
  16. on initialiserDebug
  17.   global windowDebug, g_call_param, gRefSequence, gNbEtapesSequence, gNumEtapeSequence, gListePausesNavigation, gListeIndex, gTypeTempoEtape, gElementSonEtape, gListeRefsIndexEtape, gListeTransitionEtape, gNumEtapeMax, gListeTransitions, gListeDeroulementSequence, gValeurTempoEtape
  18.   set char1 to char 1 of gRefSequence
  19.   set char2 to char 2 of gRefSequence
  20.   set char3 to char 3 of gRefSequence
  21.   set texteTitre to getNomSeq(char1, value(char2), value(char3))
  22.   set texteListeIndex to EMPTY
  23.   repeat with i = 1 to count(gListeIndex)
  24.     set refIndex to getPropAt(gListeIndex, i)
  25.     put refIndex && "->" && getAt(getaProp(gListeIndex, refIndex), 2) & RETURN after texteListeIndex
  26.   end repeat
  27.   delete line the number of lines in texteListeIndex of texteListeIndex
  28.   tell windowDebug
  29.     put gRefSequence into field "Ch. Sequence"
  30.     put texteTitre into field "Ch. Titre"
  31.     set texteSonsSequence to EMPTY
  32.     set texteReperesSequence to EMPTY
  33.     repeat with i = 1 to gNbEtapesSequence
  34.       set listeEtape to getAt(gListeDeroulementSequence, i)
  35.       set elementSonEtape to getAt(listeEtape, 4)
  36.       if not (texteSonsSequence contains elementSonEtape) then
  37.         put elementSonEtape & RETURN after texteSonsSequence
  38.       end if
  39.       set repereImpression to getAt(listeEtape, 6)
  40.       if repereImpression = 1 then
  41.         put i & "-" after texteReperesSequence
  42.       end if
  43.     end repeat
  44.     delete char the number of chars in texteReperesSequence of texteReperesSequence
  45.     delete line the number of lines in texteSonsSequence of texteSonsSequence
  46.     set textePausesNav to EMPTY
  47.     repeat with i = 1 to count(gListePausesNavigation)
  48.       put getAt(gListePausesNavigation, i) & "-" after textePausesNav
  49.     end repeat
  50.     delete char the number of chars in textePausesNav of textePausesNav
  51.     if voidp(g_call_param) then
  52.       set texteG_Call_Param to "<Vide>"
  53.     else
  54.       set texteG_Call_Param to g_call_param
  55.     end if
  56.     put texteG_Call_Param into field "Ch. g_Call_Param"
  57.     put textePausesNav into field "Ch. Navigation"
  58.     put texteListeIndex into field "Ch. ListeIndex"
  59.     put texteReperesSequence into field "Ch. Reperes"
  60.     put texteSonsSequence into field "Ch. ListeSons"
  61.   end tell
  62. end
  63.  
  64. on updaterDebug
  65.   global windowDebug, g_call_param, gRefSequence, gNbEtapesSequence, gNumEtapeSequence, gListePausesNavigation, gListeIndex, gTypeTempoEtape, gElementSonEtape, gListeRefsIndexEtape, gListeTransitionEtape, gNumEtapeMax, gListeTransitions, gListeDeroulementSequence, gValeurTempoEtape
  66.   if gListeRefsIndexEtape = [] then
  67.     set texteRefsIndexEtape to "Aucun"
  68.   else
  69.     set texteRefsIndexEtape to EMPTY
  70.     repeat with i = 1 to count(gListeRefsIndexEtape)
  71.       set refIndexEtape to getAt(gListeRefsIndexEtape, i)
  72.       put refIndexEtape & "," after texteRefsIndexEtape
  73.     end repeat
  74.     delete char the number of chars in texteRefsIndexEtape of texteRefsIndexEtape
  75.   end if
  76.   if gListeTransitionEtape = [] then
  77.     set texteTransitionEtape to "---"
  78.   else
  79.     set texteTransitionEtape to gListeTransitionEtape
  80.   end if
  81.   if gTypeTempoEtape = "NoDelay" then
  82.     set texteTempoEtape to gTypeTempoEtape && "(-)"
  83.   else
  84.     set texteTempoEtape to gTypeTempoEtape && "(" & gValeurTempoEtape & ")"
  85.   end if
  86.   set texteEtape to 33
  87.   if gNumEtapeSequence > 9 then
  88.     set texteEtape1 to gNumEtapeSequence
  89.   else
  90.     set texteEtape1 to " " & gNumEtapeSequence
  91.   end if
  92.   if gElementSonEtape = EMPTY then
  93.     set texteSonEtape to "Aucun"
  94.   else
  95.     set texteSonEtape to gElementSonEtape
  96.   end if
  97.   tell windowDebug
  98.     put texteEtape1 into char 1 to 2 of field "Ch. Etape"
  99.     put gNbEtapesSequence && "(" & gNumEtapeMax & ")" into char 4 to 10 of field "Ch. Etape"
  100.     put texteTempoEtape into field "Ch. Tempo"
  101.     put texteSonEtape into field "Ch. SonEtape"
  102.     put texteRefsIndexEtape into field "Ch. Index"
  103.     put getaProp(gListeTransitions, getAt(gListeTransitionEtape, 1)) into field "Ch. Transition"
  104.     put texteTransitionEtape into field "Ch. CodeTransition"
  105.   end tell
  106. end
  107.